<!DOCTYPE html>
<html lang="en">

<head>
    <title>user</title>
    <meta charset="UTF-8">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="../css/demo.css">
    <link rel="stylesheet" href="../css/bootstrap.css">
    <!-- 图标 -->
    <link rel="stylesheet" href="../css/font-awesome.css">
</head>

<body>
    <!-- header -->
    <header class="header fixed-top">

        <div class="branding">
            <div class="container-fluid position-relative pt-2">
                <div class="logo-wrapper">
                    <div class="site-logo">
                        <a class="navbar-brand" href="index.html">
                            <img class="logo-icon mr-2" src="../img/logo.svg" alt="logo">
                            <span class="logo-text">DBS<span class="text-alt">课程评价系统</span></span>
                        </a>
                    </div>
                </div>
                <div class="d-flex justify-content-end align-items-center pt-2">
                    <form class="search-form" id="search-form" action="search_result.html">
                        <input type="text" placeholder="你可能感兴趣的课程..." name="search" class="form-control search-input">
                        <button class="btn search-btn"><i class="fa fa-search"></i></button>
                    </form>
                    <ul class="top-icon mx-md-3 mx-lg-5 mb-0 d-none d-lg-flex hiddenx" id="icon">
                        <li class="list-inline-item">
                            <a href="user.html"><i class="fa fa-github"></i></a>
                            <p5 id="navname"></p5>
                        </li>
                    </ul>

                    <a href="login.html" class="btn btn-primary d-none d-lg-flex hiddenx" id="login">登录/注册</a>
                </div>
            </div>
        </div>
    </header>


    <div id="userBox">
        <div class="btn-group btn-group-lg" id="buttonBox">
            <button class="btn btn-default" type="button" onclick="switcher(1)">
                <em class="glyphicon glyphicon-align-left"></em> 用户信息
            </button>
            <button class="btn btn-default" type="button" onclick="switcher(2)">
                <em class="glyphicon glyphicon-align-justify"></em> 修改密码
            </button>
        </div>
        <div id="div1">
            <table class="table table-condensed table-hover">
                <tbody>
                    <tr>
                        <td>昵称</td>
                        <td id="nickname">小明</td>
                    </tr>
                    <tr>
                        <td>真实姓名</td>
                        <td id="name">小明</td>
                    </tr>
                    <tr>
                        <td>学号</td>
                        <td id="studentId">17020031000</td>
                    </tr>
                    <tr>
                        <td>性别</td>
                        <td id="college">信息科学与工程学院</td>
                    </tr>
                    <tr>
                        <td>年龄</td>
                        <td id="major">计算机科学与技术</td>
                    </tr>
                    <tr>
                        <td>院系</td>
                        <td id="grade">2017</td>
                    </tr>
                    <tr>
                        <td>邮箱</td>
                        <td id="mail">1234567890@ouc.edu.cn</td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div id="div2" hidden>
            <div class="container">
                <div class="row clearfix">
                    <div class="col-md-12 column">
                        <form class="form-horizontal" role="form" onsubmit="changePassword()">
                            <div class="form-group">
                                <label for="oldpassword" class="col-sm-2 control-label">原密码</label>
                                <div class="col-sm-10">
                                    <input class="form-control" id="oldpassword" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="newpassword" class="col-sm-2 control-label">新密码</label>
                                <div class="col-sm-10">
                                    <input class="form-control" id="newpassword" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="newpassword2" class="col-sm-2 control-label">确认密码</label>
                                <div class="col-sm-10">
                                    <input class="form-control" id="newpassword2" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">验证邮箱</label>
                                <div class="col-sm-10">
                                    <p id="div3-email">1234567890@ouc.edu.cn</p>
                                </div>
                            </div>
                            &nbsp;&nbsp;&nbsp;
                            <button type=button class="btn btn-default btn-info">发送验证码</button>
                            <br/>
                            <br/>
                            <div class="form-group">
                                <label for="code" class="col-sm-2 control-label">验证码</label>
                                <div class="col-sm-10">
                                    <input class="form-control" id="code" />
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-offset-2 col-sm-10">
                                    <button type="submit" class="btn btn-lg btn-success">修改</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <!-- footer -->
    <!-- <footer class="footer">
        <div class="footer-bottom text-center py-5">
            <ul class="social-list list-unstyled pb-4 mb-0">
                <li class="list-inline-item"><a href="#"><i class="fa fa-github"></i></a></li>
                <li class="list-inline-item"><a href="#"><i class="fa fa-twitter"></i></a></li>
                <li class="list-inline-item"><a href="#"><i class="fa fa-slack"></i></a></li>
                <li class="list-inline-item"><a href="#"><i class="fa fa-product-hunt"></i></a></li>
                <li class="list-inline-item"><a href="#"><i class="fa fa-facebook-f"></i></a></li>
                <li class="list-inline-item"><a href="#"><i class="fa fa-instagram"></i></a></li>
            </ul>
            <small class="copyright">Copyright &copy; 2019.All rights reserved.<a target=""></a></small>
        </div>
    </footer> -->
    <!-- Javascript -->
    <script src="../js/jquery-3.4.1.js"></script>
    <script src="../js/bootstrap.js"></script>
    <script src="../js/util.js"></script>
    <script src="../js/user.js"></script>
    <script>
        // 没登录
        if (getCookie("user") === undefined || getCookie("user") === "") {

            document.getElementById("icon").classList.add("hiddenx");
            document.getElementById("login").classList.remove("hiddenx");
        } else {
            // document.getElementById("navname").innerText = getCookie("user").nickname;
            document.getElementById("login").classList.add("hiddenx");
            document.getElementById("icon").classList.remove("hiddenx");
        }
    </script>
</body>

</html>